% !TeX encoding = UTF-8

\documentclass[xcolor=table,dvipsnames,svgnames,aspectratio=169,fontset=ubuntu]{ctexbeamer}
% Author: Alexara Wu <alexarawu@outlook.com>

\usepackage{tikz}
\usetikzlibrary{arrows}

\graphicspath{{figures/}}

\usetheme{sjtug}

\usepackage{mflogo} % for \MF, \MP
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage{ccicons}
\usepackage{hologo}
\usepackage{colortbl}
\usepackage{shapepar}
\usepackage{hyperxmp}
\usepackage{booktabs}
\usepackage{qrcode}
\usepackage{listings}
\usepackage{tipa}
\usepackage{multicol}
\usepackage{datetime2}
\usepackage{xeCJKfntef}
\usepackage{fontawesome}
\usepackage{hyperref}

\pdfstringdefDisableCommands{
  \let\\\relax
  \let\quad\relax
  \let\hspace\@gobble
}

% From user guide
\makeatletter
\def\psRotation#1(#2,#3)#4{%
  \rput{#1}(#2,#3){%
    \psellipticarc[linewidth=.4pt]{->}(0,-0.1)(0.6,0.15){120}{70}
    \ifdim#1pt>\z@\rput[l]{*0}(0.675,0){#4}\else\rput[l](0.675,0){#4}\fi
  }%
}
\makeatother

% For tipa to work.
\newfontfamily\useTIPAfont{Times New Roman}

\usepackage[sfdefault]{roboto}

% xeCJK conf setup
\renewcommand\CJKfamilydefault{\CJKsfdefault} % for slides

\setCJKsansfont{Noto Sans CJK SC}
\setCJKmonofont{Noto Sans Mono CJK SC}

\renewcommand{\TeX}{\hologo{TeX}}
\renewcommand{\LaTeX}{\hologo{LaTeX}}
\newcommand{\BibTeX}{\hologo{BibTeX}}
\newcommand{\XeTeX}{\hologo{XeTeX}}
\newcommand{\pdfTeX}{\hologo{pdfTeX}}
\newcommand{\LuaTeX}{\hologo{LuaTeX}}
\renewcommand{\CTeX}{C\TeX}
\newcommand{\MiKTeX}{\hologo{MiKTeX}}
\newcommand{\MacTeX}{Mac\hologo{TeX}}
\newcommand{\beamer}{\textsc{beamer}}
\newcommand{\XeLaTeX}{\hologo{Xe}\kern-.13em\LaTeX{}}
\newcommand{\pdfLaTeX}{pdf\LaTeX{}}
\newcommand{\LuaLaTeX}{Lua\LaTeX{}}

\def\TeXLive{\TeX{} Live\xspace}
\let\TL=\TeXLive
\newcommand{\SJTUThesis}{\textsc{SJTUThesis}\xspace}
\newcommand{\SJTUThesisVersion}{1.0.0rc7}
\newcommand{\SJTUThesisDate}{2020/7/31}

\newcommand\link[1]{\href{#1}{\faLink}}
\newcommand\pkg[1]{\texttt{#1}}

\def\cmd#1{\texttt{\color{DarkBlue}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{DarkBlue}\footnotesize #1}}
\def\cmdxmp#1#2#3{\small{\texttt{\color{DarkBlue}$\backslash$#1}\{#2\}\hspace{1em}\\ $\Rightarrow$\hspace{1em} {#3}\par\vskip1em}}

\lstset{
  language=[LaTeX]TeX,
  basicstyle=\ttfamily\footnotesize,
  tabsize=2,
  keywordstyle=\bfseries\ttfamily\color{sjtuPrimary},
  commentstyle=\sl\ttfamily\color[RGB]{100,100,100},
  stringstyle=\ttfamily\color[RGB]{50,50,50},
  extendedchars=true,
  breaklines=true,
}
\lstdefinestyle{style@inline}{
  basicstyle   = \ttfamily,
  keepspaces   = true
}
\lstMakeShortInline[style=style@inline]|

\title{如何使用 \LaTeX 排版论文}

\author{吴伟健}
\institute{上海交通大学 Linux 用户组}
\date{\the\year 年 \the\month 月}
\subject{LaTeX, 论文排版, SJTUThesis}

% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>{目录}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\hypersetup{
  pdfsubject = {上海交通大学图书馆专题培训讲座},
  pdfauthor = {Alexara Wu},
  pdfcopyright = {Licensed under CC-BY-SA 4.0. Some rights reserved.},
  pdflicenseurl = {http://creativecommons.org/licenses/by-sa/4.0/},
  unicode            = true,
  psdextra           = true,
  pdfdisplaydoctitle = true
}

\logo{\includegraphics[height=.9cm]{sjtug-logo.pdf}}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}


\begin{frame}{关于}
  \begin{columns}[c]
    \begin{column}{.7\textwidth}
      \begin{itemize}
        \item 最后更新：\texttt{\DTMnow}
        \item 本幻灯片源码：
          \begin{itemize}
            \item \url{https://github.com/sjtug/sjtulib-latex-talk}
          \end{itemize}
        \item 本幻灯片参考：
          \begin{itemize}
            \item \url{https://github.com/tuna/thulib-latex-talk}
            \item \url{https://github.com/stone-zeng/latex-talk}
            \item \SJTUThesis{} 使用示例文档 v\SJTUThesisVersion
          \end{itemize}
        \item 本幻灯片下载：
          \begin{itemize}
            % \item GitHub Releases \link{https://github.com/sjtug/sjtulib-latex-talk/releases}
            \item OverLeaf \link{https://www.overleaf.com/read/fvwxzvcxhcwd}
          \end{itemize}
        \item 许可证：CC BY-SA 4.0 Unported \ccbysa
      \end{itemize}
    \end{column}
    \begin{column}{.3\textwidth}
      \qrcode[hyperlink, height=4cm]{https://www.overleaf.com/read/fvwxzvcxhcwd}
    \end{column}
  \end{columns}
\end{frame}


\begin{frame}{目录}
  \tableofcontents
  % You might wish to add the option [pausesections]
\end{frame}


\include{contents/introduction}
\include{contents/basis}
\include{contents/thesis}
\include{contents/summary}

\begin{frame}
  \begin{center}
    {\fontencoding{OT1}\fontfamily{pzc}\fontseries{mb}
     \fontshape{it}\Huge\selectfont Thank you!}
  \end{center}
\end{frame}

\end{document}
